
import { getDepartment } from '@/api/department'
const state = {
  // 部门列表
  depts: []
}
const mutations = {
  steDepartment(state, data) {
    state.depts = data
  }
}
const actions = {
  // 获取部门列表
  async getDepartment(store) {
    const { depts } = await getDepartment()
    // console.log(depts)
    store.commit('steDepartment', depts)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
